package com.ztom.context.support.event.multicast

import com.ztom.context.support.event.event.ApplicationEvent
import com.ztom.context.support.event.listener.ApplicationListener

/**
 * @author ZhangTao
 */
interface ApplicationEventMulticaster {

    /**
     * 注册监听器
     */
    fun addApplicationListener(listener: ApplicationListener<*>)

    /**
     * 移除监听器
     */
    fun removeApplicationListener(listener: ApplicationListener<*>)

    /**
     * 派发事件
     */
    fun multicastEvent(event: ApplicationEvent)
}